# 轮次
last_point_path=${1:-}

# 训练模型
bash -ex train.sh $model_path

# 获取生成的checkout
new_checkout=$(ls output/ | sort -r -t '-' -k 2 -k3 | head -n 1)
last_checkpoint=$(ls output/$new_checkout | grep 'checkpoint-' | grep -v 'merged' | sort -r | head -n 1)
last_point_path=output/${new_checkout}/${last_checkpoint}

# 合并模型
bash -ex merge_model.sh $last_point_path

echo $last_point_path
